import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  { path: '/home', name: 'home', component: () => import('@/views/Home-page.vue') },
  { path: '/about', name: 'about', component: () => import('@/views/About-page.vue') }
  // 添加其他路由配置...
]

const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes:routes.map(item=>{
    return {
      ...item,
      path:`/child-vue2${item.path}`
    }
  })
})

export default router